package com.xiao.spring.aop.aop_2_aspect;

import java.util.Arrays;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

@Aspect
public class LogAdvice {

	@Before("com.xiao.spring.aop.service.SystemArchitecture.businessService")
	public void before(JoinPoint joinPoint){
		System.out.println("执行前参数：" + Arrays.toString(joinPoint.getArgs()));
	}
	
	@AfterReturning(pointcut="com.xiao.spring.aop.service.SystemArchitecture.businessService",returning="result")
	public void afterReturn(Object result){
		System.out.println("执行后结果：" + result);
	}
		
	
}
